import threading
from time import *

class Clock(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
        self.stop=0
    def run(self):
        self.last,self.start=time(),time()
        while(not self.stop):
            print(end="\r{:<10}".format("%.2f"%(time()-self.start)))
            print(end="{:<3}{:<10}".format("","%.2f"%(time()-self.last)))
            sleep(0.01)
    
    def tick(self):
        pass

def func(isHelp=False):
    if(isHelp):return ["stopwatch","~ stopwatch","#stop_watch"]
    clock=Clock()
    clock.start()
    while(1):
        try:
            input()
            clock.last=time()
        except:
            clock.stop=1
            return 

